<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />
        <script src="js/time.js?"></script>

		<script charset="utf-8" src="edit/kindeditor.js"></script>
		<script charset="utf-8" src="edit/lang/zh_CN.js"></script>
		<script charset="utf-8" src="edit/plugins/code/prettify.js"></script>
	
        <script>
        KindEditor.ready(function(K) {
            var editor1 = K.create('textarea[id="answer"]', {
                //width : w,
                cssPath: 'edit/plugins/code/prettify.css',
                uploadJson: 'edit/php/upload_json.php',
                fileManagerJson: 'edit/php/file_manager_json.php',
                allowFileManager: true,
                urlType: "domain",
                afterCreate: function() {
                    var self = this;
                    K.ctrl(document, 13, function() {
                        self.sync();
                        K('form[name=rowForm]')[0].submit();
                    });
                    K.ctrl(self.edit.doc, 13, function() {
                        self.sync();
                        K('form[name=rowForm]')[0].submit();
                    });
                }
            });
            prettyPrint();
        });
        </script>
    </head>
    <body>
        <?php include(VIEWPATH . 'common/main_header.php'); ?>
        <center><?=translate('REPLAY') ?></center>
        <form action="" method="POST" id="rowForm">
            <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tablegrid tableedit">
            	<tr><td><?= translate('MANAGERBUG_QUESTION') ?>:</td><td><?= $row['question'] ?></td></tr>
            	<tr><td><?= translate('MANAGERBUG_CREATETIME') ?>:</td><td><?= $row['createtime']?></td></tr>
            	<tr><td><?= translate('MANAGERBUG_ISANSWER') ?>:</td>
            		<td><?php if(1==$row['isanswer']) {?> <?= translate('YES') ?> <?php } else { ?> <?= translate('NO') ?> <?php }?></td>
            	</tr>
                <tr><td><?= translate('MANAGERBUG_ANSWER') ?>:</td>
                	<td>
                	<textarea cols="70" rows="13" name="row[answer]" id="answer"><?=$row['des'] ?><?php if('1'==$row['isanswer']){  echo trim($row['answer']);   } ?></textarea>
                	<!--  
                	<textarea name="row[answer]" id = "answer" cols="80" rows="5"><?php if('1'==$row['isanswer']){  echo trim($row['answer']);   } ?></textarea>
                	-->
                	</td>
                </tr>             
                <tr><td><?= translate('MANAGERBUG_REPLAYTIME') ?>:</td> <td><?= $row['replaytime']?></td></tr>               
                <tr><td><input type="hidden" name="row[isEver]" value="<?= $row['isEver'] ?>">
                </td><td><input type="submit" value="<?= translate('SUBMIT') ?>" id="submit"/> 
                <input type="reset" value="<?= translate('RESET') ?>" id="reset"/></td></tr>
            </table>
        </form>
        <script type="text/javascript">
            SG.init("core.form", function() {
                $.formValidator.initConfig({formid: "#rowForm", submitonce: true});
                $("#answer").formValidator({empty: false, onshow: '<?= translate('C_NOT_EMPTY') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
            });
        </script>
    </body>
</html>